package com.kc.gb.feign.ptl.support.enums;

public enum PtlCommandType {

    LIGHT(0,"LIGHT"),
    LED( 1,"LED"),
    BUTTON(2,"BUTTON"),
    BEEP(3,"BEEP"),
    ;

    /**
     * 错误码
     */
    private int code;

    /**
     * 错误信息
     */
    private String desc;


    /**
     * 使用错误码和错误信息构造枚举
     *
     * @param code    错误码
     * @param message 错误信息
     */
    PtlCommandType(int code, String message) {
        this.code = code;
        this.desc = message != null ? message : "";
    }

    /**
     * 获取错误码
     *
     * @return String
     */
    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
